﻿<UserControl x:Class="GBlason.Control.Aggregate.ResourcePage"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:Properties="clr-namespace:GBlason.Properties"
             xmlns:Aggregate="clr-namespace:GBlason.Control.Aggregate" x:Name="ResourcePageControl"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="600">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="3*"/>
            <ColumnDefinition Width="3"/>
            <ColumnDefinition Width="5*"/>
        </Grid.ColumnDefinitions>
        
        <DataGrid x:Name="AllResourcesDataGrid"
                  Grid.Column="0"
                  AutoGenerateColumns="False"
                  SelectionMode="Single"
                  ItemsSource="{Binding ElementName=ResourcePageControl, Path=DataResources}">
            <DataGrid.Columns>
                <DataGridTextColumn Header="{x:Static Properties:Resources.ResourcePageGridColumnType}"
                                    Binding="{Binding Path=TypeOfResource}"/>
                <DataGridTextColumn Header="{x:Static Properties:Resources.ResourcePageGridColumnName}"
                                    Binding="{Binding Path=Name}"/>
                <DataGridTextColumn Header="{x:Static Properties:Resources.ResourcePageGridColumnPicture}"/>
            </DataGrid.Columns>
        </DataGrid>
        
        <GridSplitter Grid.Column="1"
                      Width="3" VerticalAlignment="Stretch"
                      HorizontalAlignment="Center"/>
        
        <Aggregate:ShapeResourceEditor Grid.Column="2" Grid.Row="0"
                                       DataContext="{Binding ElementName=AllResourcesDataGrid, Path=SelectedItem}"/>
        
    </Grid>
</UserControl>
